Python chess search function: pop from empty list

welcome to shbcf.ru